package indi.jp.project.process.service;

import indi.jp.project.core.entity.JsonResult;
import indi.jp.project.process.entity.FlowTask;
import indi.jp.project.process.entity.FlowTaskParam;
import indi.jp.project.process.entity.FlowTaskStep;

import java.util.List;

/**
 * 任务流程Service
 *
 * @author jiangping
 * @date 2022/5/5
 */
public interface FlowTaskService {

    /**
     * 查询任务流程
     */
    JsonResult queryTaskFlow(String taskId) throws Exception;

    /**
     * 保存任务流程
     */
    void saveTaskFlow(String taskId, List<FlowTask> list) throws Exception;

    /**
     * 提交
     */
    JsonResult flowSubmit(FlowTaskParam flowTaskParam) throws Exception;

    /**
     * 同意
     */
    JsonResult flowAgree(FlowTaskParam flowTaskParam) throws Exception;

    /**
     * 驳回
     */
    JsonResult flowReject(FlowTaskParam flowTaskParam) throws Exception;

    /**
     * 撤回
     */
    JsonResult flowRevoke(FlowTaskParam flowTaskParam) throws Exception;

    /**
     * 作废
     */
    JsonResult flowCancel(FlowTaskParam flowTaskParam) throws Exception;

    /**
     * 查询流程历史
     */
    JsonResult loadFlowHistory(String taskId) throws Exception;

    /**
     * 删除任务流程，在删除任务时调用
     */
    void deleteFlowByTaskId(String taskId) throws Exception;

}
